All Functions Used So Far, Week 7

max

{base}

Get maximum of a vector

group_by

{dplyr}

Group tibble/data.frame by a factor variable. All further tidyverse operations are performed group-wise

min

{base}

Get minimum of a vector

length

{base}

Returns number of elements in an object

predict

{stats}

Generate predicted values from model objects

install.packages

{utils}

Install R packages

glm

{base}

Fits generalized linear models

group_tt

{tinytable}

Grouping in tinytable

head

{utils}

Show first 5 rows of a data frame

View

{base}

View a data frame

factor

{base}

Create factor variables

library

{base}

Load an R package

summary

{base}

Obtain summary statistics or detailed regression output

vcovSCC

{plm}

Computes Driscoll and Kraay (SCC) robust covariance matrix estimators for panel models

sd

{stats}

Get standard deviation of a vector

log

{base}

log (default base = e)

coeftest

{lmtest}

Inference for Estimated Coefficients

setwd

{base}

Set Working Directory

var

{stats}

Calculate variance

c

{base}

Combine values/vectors into a vector

dnorm

{stats}

Density distribution for the normal distribution

arrange

{dplyr}

Sort values of data frame according to a variable/combination of variables

read_excel

{readxl}

Read an Excel file

ls

{base}

Return a vector of character strings giving the names of the objects in the specified environment

plm

{plm}

Estimates linear panel data models (fixed effects, random effects, pooling, between, first-differences)

t.test

{stats}

Performs one and two sample t-tests on vectors of data.

order

{base}

Get indexes that will sort a vector

is.na

{base}

Check if a value is NA/elements of vector are NA

modelsummary

{modelsummary}

Creates regression and data tables

data.frame

{base}

Create a data.frame from vectors

nobs

{stats}

Return the number of observations in a model object

pdata.frame

{plm}

Creates a panel data frame, the data structure used by the plm package for panel/longitudinal data

cut

{base}

Convert Numeric to Factor

rm

{base}

Remove objects

ordered

{dplyr}

Create an ordered factor

binomial

{base}

Family argument in glm()

save_tt

{tinytable}

Save a tinytable object to a file

mutate

{dplyr}

Create new variables

lag

{dplyr}

Shift values in a vector or time series

quantile

{stats}

Obtain empirical quantiles of a vector

colMeans

{base}

Computes the means of each column of a numeric matrix or data frame

ungroup

{dplyr}

Resolve grouping created with “group_by”

range

{base}

Return range of values

ifelse

{base}

Return a or b depending on the value of test

names

{base}

Get or set names of an object

str

{utils}

Get the structure of an R object

sim_slopes

{interactions}

Perform simple slopes analysis for interaction effects.

list

{base}

Create a list object

complete.cases

{stats}

Find Complete Cases

mean

{base}

Get mean of a vector

nrow

{base}

Get number of rows of a data frame

median

{stats}

Get median of a vector

seq

{base}

Create a sequence

lm

{stats}

Fit linear models using least squares

expression

{base}

Used in plots to add symbols to axes

scale_color_manual

{ggplot2}

Manually sets the colours used in a ggplot color scale to user-specified values

filter

{dplyr}

Filter out rows of a data frame according to logical vector

factor

{base}

Create a factor

tibble

{tibble}

A modern data frame from the tidyverse

read.csv

{utils}

Read a csv file to data frame. Specify stringsAsFactors = FALSE to keep all string columns as characters

The end!